package com.java.grammer.constructer.exer2;

/**
 * @author luzhikun
 * @date 2020/11/29- 11:10
 */
public class Rectangle {
    private double legth;
    private double wide;

    public Rectangle() {

    }

    public Rectangle(double legth, double wide) {
        this.legth = legth;
        this.wide = wide;
    }

    public double getLegth() {
        return legth;
    }

    public void setLegth(double legth) {
        this.legth = legth;
    }

    public double getWide() {
        return wide;
    }

    public void setWide(double wide) {
        this.wide = wide;
    }

    public double area() {
        double area = legth * wide;
        return area;
    }

    public double perimeter() {
        double perimeter = (legth + wide) * 2;
        return perimeter;
    }

}
